<template>
  <div id="app">
    <h3>案例：折叠面板</h3>
    
    <!-- 3.使用组件 -->
    <Pannel>
      <!-- scope是接收的变量名 -->
      <template  v-slot="scope" >
         <h3>{{scope.row.firstname}}</h3>
         <h1>{{scope.row.lastname}}</h1> 
      </template>    
    </Pannel>
    
  </div>
</template>

<script>
// 1.引入组件
import Pannel from "./components/Pannel.vue";

// 2.注册组件
export default {
  components: {
    Pannel,
  },
};
// 3.使用组件
</script>

<style lang="less" scoped>
body {
  background-color: #ccc;
  #app {
    width: 400px;
    margin: 20px auto;
    background-color: #fff;
    border: 4px solid blueviolet;
    border-radius: 1em;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5);
    padding: 1em 2em 2em;
    h3 {
      text-align: center;
    }
  }
}
</style>